package com.wt.controller;

import com.wt.pojo.User;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/user")
@RestController
public class ProviderPayController {

    @PostMapping
    public String addUser(@RequestBody User user){
        System.out.println("添加="+user);
        return  "OK  post";
    }

    @PutMapping
    public String updUser(@RequestBody User user){
        System.out.println("修改="+user);
        return  "OK  post";
    }

    @DeleteMapping("/{id}")
    public String  deleteUser(@PathVariable("id") Integer id){
        System.out.println("删除======"+id);
        return "删除成功";
    }

    @GetMapping
    public String listUser(Integer id,String name,Integer age){
        System.out.println("id="+id+"  name="+name+"  age="+age);
        User user = new User();
        return name;
    }

}
